package com.eastfair.venuebooking.dto;

import com.eastfair.venuebooking.enumeration.ExhibitionTaskFinishStatusEnum;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 实体类
 * 任务
 * </p>
 *
 * @author linan
 * @since 2022-06-27
 */
@Data
@ApiModel(value = "ExhibitionTaskUpdateDTO", description = "任务")
public class ExhibitionTaskDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 校验标识
     */
    public interface Check {};

    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @NotNull(message = "展会id不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private Long exhibitionId;
    /**
     * 任务标题
     */
    @ApiModelProperty(value = "任务标题")
    @Size(max = 255, message = "任务标题长度不能超过255")
    @NotBlank(message = "任务标题不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private String taskName;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @NotNull(message = "开始时间不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @NotNull(message = "结束时间不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private LocalDateTime endTime;
    /**
     * 环节id
     */
    @ApiModelProperty(value = "环节id")
    @NotNull(message = "环节id不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private Long segmentId;
    /**
     * 环节名称
     */
    @ApiModelProperty(value = "环节名称")
    @Size(max = 255, message = "环节名称长度不能超过255",groups = ExhibitionTaskSaveDTO.Check.class)
    @NotBlank(message = "环节名称不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private String segmentName;
    /**
     * 展厅
     */
    @ApiModelProperty(value = "展厅")
    @NotEmpty(message = "展厅不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private List<ExhibitionTaskSpaceDTO> spaceList;

    @ApiModelProperty(value = "服务部门/人员")
    @NotEmpty(message = "服务部门/人员不能为空",groups = ExhibitionTaskSaveDTO.Check.class)
    private List<ExhibitionTaskOrgDTO> exhibitionTaskOrg;
    /**
     * 提醒方式，数据字典,分割
     */
    @ApiModelProperty(value = "提醒方式，数据字典,分割")
    @Size(max = 64, message = "提醒方式，数据字典,分割长度不能超过64")
    private String remindWay;

    /**
     * 完成状态 #{NOT_FINISHED:未完成;HAVE_IN_HAND:进行中;COMPLETED:已完成}
     */
    @ApiModelProperty(value = "完成状态 #{NOT_FINISHED:未完成;HAVE_IN_HAND:进行中;COMPLETED:已完成}")
    private ExhibitionTaskFinishStatusEnum finishStatus;

    /**
     * 备注（任务描述）
     */
    @ApiModelProperty(value = "备注（任务描述）")
    @Size(max = 1024, message = "备注（任务描述）长度不能超过1024")
    private String remark;

    @Data
    @ToString(callSuper = true)
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ExhibitionTaskSpaceDTO{
        Long spaceId;
        String spaceName;
    }
}
